package com.kang.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kang.pojo.Picking;
import com.kang.pojo.PickingItem;
import com.kang.pojo.PickingReturn;
import com.vonechina.entity.page.PickingPage;
import com.vonechina.entity.page.PickingReturnPage;

/**
 * 领料归还
 * 
 * @author ysq
 *
 */
public interface PickingReturnMapper {
	/**
	 * 根据pickingreturnID删除pickingreturn
	 * 
	 * @param pickingreturnID
	 * @return
	 */
	public int deletePickingreturn(Integer pickingreturnID);

	/**
	 * 修改领料归还信息
	 * 
	 * @param pickingReturn
	 * @return
	 */
	public int updatePickingReturn(PickingReturn pickingReturn);

	/**
	 * 根据pickingreturnID查询领料归还
	 * 
	 * @param pickingreturnID
	 * @return
	 */
	public PickingReturn selectPickingReturnByPickingreturnID(
			int pickingreturnID);

	/**
	 * 查询领料归还
	 * 
	 * @param pickingReturnPage
	 * @return
	 */
	public List<PickingReturn> selectByWheres(
			PickingReturnPage pickingReturnPage);

	/**
	 * 查询领料归还总条数
	 * 
	 * @param pickingReturnPage
	 * @return
	 */
	public int selectByWheresSum(PickingReturnPage pickingReturnPage);

	/**
	 * 查询领料出库单-用于选择领料出库单
	 * 
	 * @param pickingPage
	 * @return
	 */
	public List<Picking> selectPickingList(PickingPage pickingPage);

	/**
	 * 查询领料出库单总条数-用于选择领料出库单
	 * 
	 * @param pickingPage
	 * @return
	 */
	public int selectPickingListSum(PickingPage pickingPage);

	/**
	 * 根据pickingID查询领料出库单
	 * 
	 * @param pickingID
	 * @return
	 */
	public Picking selectPickingByPickingID(
			@Param("pickingID") Integer pickingID);

	/**
	 * 根据pickingID查询出picking_iteminfomation（领料出库-库位-物品（表））
	 * 
	 * @param pickingID
	 * @return
	 */
	public List<PickingItem> selectPickingItemByPickingID(Integer pickingID);

	/**
	 * 添加领料归还信息
	 * 
	 * @param pickingReturn
	 * @return
	 */
	public int addPickingReturn(PickingReturn pickingReturn);

	/**
	 * 查询最大的领料归还单号
	 * 
	 * @return
	 */
	public String selectMaxPickingreturnNumber();
}